import {UploadOutlined} from '@ant-design/icons';
import {ModalForm} from '@ant-design/pro-components';
import {Button, Upload} from 'antd';

export interface FormValueType extends Partial<any> {
    jobClassName: string;
    target?: string;
    template?: string;
    type?: string;
    time?: string;
    frequency?: string;
  }

  export interface EditFormProps {
    onOpenChange: (flag?: boolean, formVals?: FormValueType) => void;
    onSubmit: (values: FormValueType) => Promise<void>;
    modalVisible: boolean;
  }


export default (props:EditFormProps) => {

  return (
    <ModalForm
        open={props.modalVisible}
        onOpenChange={props.onOpenChange}
        onFinish={props.onSubmit}
    >
        <Upload>
            <Button icon={<UploadOutlined />}>上传任务JAR</Button>
        </Upload>
    </ModalForm>
  );
};
